const app = getApp();
const server_prefix = "/api/user";
const service = {
  setAvatar(fileId) {
    return app.request({
      url: `${server_prefix}/personal/setAvatar?fileId=${fileId}`,
      // data: data,
      method: "post",
    });
  },
  setnickName(name) {
    return app.request({
      url: `${server_prefix}/personal/setnickName?nickName=${name}`,
      method: "post",
    });
  },
  login(data){
    return app.request({
      url: `${server_prefix}/login`,
      data: data,
      method: "post",
    });
  }
}
  
export default service;